/*
 * @Author: za-lijin
 * @Date: 2018-11-16 13:48:46
 * @Description: ''
 * @Last Modified by: zoushiyong
 * @Last Modified time: 2018-11-19 10:17:05
 * @ToDo: ''
 */
import React, { Component } from 'react'
import { Button, Modal } from 'antd'

export default class DeleteModel extends Component {
  constructor (props) {
    super(props)

    this.handleOk = this.handleOk.bind(this)
    this.handleCancel = this.handleCancel.bind(this)
  }
  handleOk () {
    this.props.handleOk()
  }
  handleCancel () {
    this.props.handleOk()
  }

  render () {
    return (
      <div className='deleteModel' >
        <Modal
          className='delete'
          title='Delete'
          visible={this.props.visible}
          okText='Confirm'
          cancelText='Cancel'
          onOk={this.handleOk}
          onCancel={this.handleCancel}
          footer={[
            <Button key='back' type='primary' onClick={this.handleOk}>Back</Button>
          ]}
        >
          <p>
Please delete the related sub-accounts first before

deleting this role.</p>
        </Modal>
      </div>
    )
  }
}
